package com.qianyu.project.mapper.provider.gsl;

import com.qianyu.project.entity.ReceiveCompany;
import org.apache.ibatis.jdbc.SQL;

/**
 * @description 描述一下方法的作用
 * @date: $ $
 * @author: $
 * @return $
 */
public class ReceiveCompanyMapperProvider {
    public String selecti(ReceiveCompany i){
        String sql=new SQL(){
            {
                SELECT("*");
                FROM("receive_company");
                if(i.getReceiveCompanyName()!=null && i.getReceiveCompanyName()!=""){
                    WHERE("receive_company_name=#{receiveCompanyName}");
                }
            }
        }.toString();
        return sql;
    }
    public String selectByid(String i){
        String sql=new SQL(){
            {
                SELECT("*");
                FROM("receive_company");
                WHERE("id="+i);
            }
        }.toString();
        return sql;
    }public String inserti(ReceiveCompany i){
        String sql=new SQL(){
            {
                INSERT_INTO("receive_company");
                VALUES("id,receive_company_name","null,#{receiveCompanyName}");
            }
        }.toString();
        return sql;
    }public String deletei(String i){
        String sql=new SQL(){
            {
                DELETE_FROM("receive_company");
                WHERE("id="+i);
            }
        }.toString();
        return sql;
    }public String updatei(ReceiveCompany i){
        String sql=new SQL(){
            {
                UPDATE("invoice_open_info");
                SET("receive_company_name=#{receiveCompanyName}");
                WHERE("id=#{id}");
            }
        }.toString();
        return sql;
    }

}
